
function detail(o) {
	window.location = 'userManage.action?id=' + o.name + "&act=edit";
}

function addUser() {
	window.location = 'userManage_showAdd.action?';
}
function deleteUser(o) {
		var name = o.name;
		var url = '';
		msg = '确认要删除用户："' + name + '" 吗？';
		if(window.confirm(msg)) {
			url = 'userManage.action?id=' + name + '&' + 'act=delete';
			window.location = url;
		}
}

function update(o) {
		var name = o.name;
	var role = document.getElementById('id_RoleSelecter_' + o.name);
	var state = document.getElementById('id_StateSelecter_' + o.name);
		var url = '';
		msg = '确认对用户："' + name + '" 更新？';
		if(window.confirm(msg)) {
			url = 'userManage.action?id=' + name + '&'
			+ 'act=update&detail=more&state=' + state.value +'&role=' + role.value;
			window.location = url;
		}
}

function resetPw(o) {
		var name = o.name;
		var url = '';
		msg = '确认对用户："' + name + '" 进行密码重置吗？';
		if(window.confirm(msg)) {
			url = 'userManage.action?id=' + name + '&' + 'act=update&detail=resetPw';
			window.location = url;
		}
}